<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <video id="video" controls></video>
    <script>
      const progressBar = document.getElementById("progressBar");
      const xhr = new XMLHttpRequest();

      xhr.open("GET", "http://127.0.0.1:3000/mp4");
      xhr.responseType = "blob";
      xhr.onload = function () {
        // 获取视频的地址
        const url = URL.createObjectURL(xhr.response);
        video.src = url;
      };

      // 发送请求
      xhr.send();
    </script>
  </body>
</html>
